package com.zyt.service.impl;

import com.zyt.entity.Phone;
import com.zyt.mapper.PhoneMapper;
import com.zyt.service.PhoneService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PhoneServiceimpl implements PhoneService {
    @Autowired
    private PhoneMapper phoneMapper;
    @Override
    public List<Phone> selectAllPhone() {
        return phoneMapper.selectAllPhone();
    }

    @Override
    public void insertPhone(Phone phone) {
        phoneMapper.insertPhone(phone);
    }

    @Override
    public void deleteById(Integer id) {
        phoneMapper.deleteById(id);
    }

    @Override
    public Phone selectByPhone(Integer id) {
        return  phoneMapper.selectByPhone(id);
    }

    @Override
    public void updateById(Phone phone) {
        phoneMapper.updateById(phone);
    }

    @Override
    public void deleteBybId(Integer id) {
        phoneMapper.deleteBybId(id);
    }
}
